package com.sibbay.vta;

import com.sibbay.tools.Tools;

import android.test.AndroidTestCase;

public class ToolsTest extends AndroidTestCase {

	public void testParseTime() {
		final String s = Tools.getCurrentTime();
		assertEquals("time ", 6, s.length());
	}

//	public void testbiggerOrEqual() {
//		assertTrue("biggerOrEqual", Tools.biggerOrEqual("01:11P", "12:11P"));
//		assertTrue("biggerOrEqual", Tools.biggerOrEqual("00:01A", "00:00A"));
//		assertTrue("biggerOrEqual", Tools.biggerOrEqual("00:01P", "00:00A"));
//		assertTrue("biggerOrEqual", Tools.biggerOrEqual("00:11A", "00:11A"));
//		assertTrue("biggerOrEqual", Tools.biggerOrEqual("12:09P", "11:54A"));
//		assertTrue("biggerOrEqual", Tools.biggerOrEqual("12:05A", "11:35P"));
//		assertTrue("biggerOrEqual", Tools.biggerOrEqual("09:34P", "09:38A"));
//		assertFalse("biggerOrEqual", Tools.biggerOrEqual("09:11A", "09:12A"));
//		assertFalse("biggerOrEqual", Tools.biggerOrEqual("11:46P", "12:42A"));
//		assertFalse("biggerOrEqual", Tools.biggerOrEqual("09:48A", "09:39P"));
//	}
//	
	public void testConverToInt() {
		assertEquals("convertToInt", 0, Tools.convertToInt("00:00A"));
		assertEquals("convertToInt", 12*60, Tools.convertToInt("00:00P"));
		assertEquals("convertToInt", 12*60, Tools.convertToInt("01:21P") - Tools.convertToInt("01:21A"));
	}
}
